<?php 
$this->breadcrumbs =
        array(
            'MLM System',
            'Members' => array('list'),
            'Detail Data ' . $model->rel_member_to_network->network_mid,
);

$this->menu = array();

//action list
array_push($this->menu, array('label' => 'List of Members', 'url' => array('list')));
?>
<div class="flat_area grid_16">
    <h2>Detail Member</h2>
</div>
<div class="box grid_16 round_all">
    <h2 class="box_head grad_colour">Data Detail</h2>
    <a href="#" class="grabber">&nbsp;</a>
    <a href="#" class="toggle">&nbsp;</a>
    <div class="toggle_container">
        <div class="block no_padding">
            <?php
            $this->widget('zii.widgets.CDetailView', array(
                'data' => $model,
                'attributes' => array(
                    array(
                        'label' => $model->getAttributeLabel('rel_member_to_network.network_mid'),
                        'value' => $model->rel_member_to_network->network_mid,
                    ),
                    array(
                        'label' => $model->getAttributeLabel('rel_member_to_network.network_level_status'),
                        'value' => $model->rel_member_to_network->network_level_status,
                    ),
                    'member_serial_id',
                    'member_name',
                    'member_nickname',
                    'member_email',
                    'member_sex',
                    'member_address',
                    'member_city_id',
                    'member_state_id',
                    'member_country_id',
                    'member_zipcode',
                    'member_birth_place',
                    'member_birth_date',
                    'member_identity_type',
                    'member_identity_no',
                    'member_phone',
                    'member_mobilephone',
                    'member_join_datetime',
                    'member_devisor_name',
                    'member_devisor_relationship',
                    'member_devisor_phone',
                    'member_bank_id',
                    'member_bank_city',
                    'member_bank_branch',
                    'member_bank_account_name',
                    'member_bank_account_no',
                    'member_tax_account_no',
                    'member_last_update',
                    'member_last_login',
                ),
                'htmlOptions' => array('class' => 'detail'),
            ));
            ?>
        </div
    </div>
</div>
</div>

    <div class="flat_area grid_16">
</div>
<div class="box grid_16 round_all">
    <h2 class="box_head grad_colour">Detail Upgrade</h2>
      <a href="#" class="grabber">&nbsp;</a>
    <a href="#" class="toggle">&nbsp;</a>
    <div class="toggle_container">
        <div class="block no_padding">
        <div class="upgrade">
            <table>
                <tr>
                    <th>No</th>
                    <th>Serial Upgrade</th>
                    <th>Type Member</th>
                    <th>Tanggal</th>
                    <!--<th>Status</th>-->
                </tr>
                <?php
                if (!empty($upgrade)) {
                    $no = 1;
                    foreach ($upgrade as $row => $print) {
                        echo '
            <tr>
                <td>' . $no . '</td>
                <td>' . $print['serial_products_user_serial_products_id'] . '</td>
                <td>' . $print['products_category_title'] . '</td>
                <td>' . Yii::app()->dateFormatter->formatDateTime($print['serial_products_user_datetime']) . '</td>
            </tr>    
            ';
                        $no++;
                    }
                } else {
                    echo '<tr><td colspan="4">Kosong</td></tr>';
                }
                ?>
            </table>
        </div>
        </div>
    </div>
        </div>

    <style>
        .upgrade{
            margin-top: 1.5%;
            width: 50%;
            margin-left: 6%;
            text-align: center;
            font-family:verdana !important;
        }
        .upgrade table{
            width: 100%;
            background:#E1E5E7;
            border-bottom-style:solid;
            border-bottom-width:1px;
            line-height:25px;
            padding:0 5px;
            vertical-align:top;
        }
        .upgrade th{
            border: 1px solid; 
            padding-top: 2%;
            padding-bottom: 2%; 
        }
        .upgrade td{
            border: 1px solid;  
        }
    </style>